﻿@{
    Layout = "/Views/Shared/_o_Main.cshtml";
}
<div class="mini-layout graybg">
    <form id="form1" class="form-horizontal" enctype="multipart/form-data"
        method="post" action="/o/newperiodical">
        <input type="hidden" name="Aptitude" />
    <fieldset>
        <legend style="font-weight: bold; color: #22a7b3; text-align: center">新增期刊</legend>
        <div class="control-group">
            <label class="control-label">
                期刊名称 (*)</label>
            <div class="controls">
                <input type="text" placeholder="期刊名" name="Name" 
                    class="{required:true,remote:{url:'/o/PeriodicalIsOnly',messages:'该期刊已存在'}} span5" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                英文名称</label>
            <div class="controls">
                <input type="text" placeholder="英文名" name="Name_EN" class="span5" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                行业分类</label>
            <div class="controls">
                <select class="inline" id="sltBaseType" name="IndType">
                </select> --
                <select class="inline" id="sltindType" name="SubIndType">
                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                期刊简介 (*)</label>
            <div class="controls">
                <textarea placeholder="期刊简介" name="Introduction" 
                class="{required:true}" style="width:500px;height:120px;"></textarea>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                期刊类型</label>
            <div class="controls">
                <label class="checkbox inline">
                    <input type="checkbox" name="AptitudeOption" value="1" />
                    核心
                </label>
                <label class="checkbox inline">
                    <input type="checkbox" name="AptitudeOption" value="2" />
                    国家级
                </label>
                <label class="checkbox inline">
                    <input type="checkbox" name="AptitudeOption" value="3" />
                    省级
                </label>
                <label class="checkbox inline">
                    <input type="checkbox" name="AptitudeOption" value="4" />
                    SCI
                </label>
                <label class="checkbox inline">
                    <input type="checkbox" name="AptitudeOption" value="5" />
                    EI
                </label>
                <label class="checkbox inline">
                    <input type="checkbox" name="AptitudeOption" value="6" />
                    普通
                </label>
                <label class="checkbox inline">
                    <input type="checkbox" name="AptitudeOption" value="7" />
                    其他
                </label>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                语言</label>
            <div class="controls">
                <label class="radio inline">
                    <input type="radio" name="Language" value="1"  checked="checked"/>
                    中文
                </label>
                <label class="radio inline">
                    <input type="radio" name="Language" value="2" />
                    English
                </label>
                <label class="radio inline">
                    <input type="radio" name="Language" value="9" />
                    其他
                </label>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                发行周期</label>
            <div class="controls">
                <label class="radio inline">
                    <input type="radio" name="PubRange" value="1" checked="checked" />
                    半月刊
                </label>
                <label class="radio inline">
                    <input type="radio" name="PubRange" value="2" />
                    月刊
                </label>
                <label class="radio inline">
                    <input type="radio" name="PubRange" value="3" />
                    双月刊
                </label>
                <label class="radio inline">
                    <input type="radio" name="PubRange" value="4" />
                    季刊
                </label>
                <label class="radio inline">
                    <input type="radio" name="PubRange" value="5" />
                    半年刊
                </label>
                <label class="radio inline">
                    <input type="radio" name="PubRange" value="6" />
                    年刊
                </label>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                期刊封面 (*)</label>
            <div class="controls">
                <input type="file" name="CoverImage" class="{required:true,accept:'png|jpg'} span5" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                主管单位</label>
            <div class="controls">
                <textarea placeholder="主管单位" name="ZGDW" style="width:500px;height:120px;"></textarea>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                收录</label>
            <div class="controls">
                <textarea placeholder="收录" name="Retrieval" 
                class=" span5"
                style="width:500px;height:120px;"></textarea>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                核心期刊</label>
            <div class="controls">
                <textarea placeholder="核心期刊" name="HeXinDescription" 
                class="span5"
                style="width:500px;height:120px;"></textarea>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                荣誉</label>
            <div class="controls">
                <textarea placeholder="荣誉" name="Honour" 
                class="span5"
                style="width:500px;height:120px;"></textarea>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                主办单位 (*)</label>
            <div class="controls">
                <textarea placeholder="主管单位" name="ZBDW" 
                class="{required:true} span5"
                style="width:500px;height:120px;"></textarea>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                协办单位</label>
            <div class="controls">
                <textarea placeholder="主管单位" name="XBDW" 
                class="span5" style="width:500px;height:120px;"></textarea>
            </div>
        </div>
        @*<div class="control-group">
            <label class="control-label">
                编辑单位</label>
            <div class="controls">
                <input type="text" placeholder="编辑单位" name="BJDW">
            </div>
        </div>*@
        <div class="control-group">
            <label class="control-label">
                社长</label>
            <div class="controls">
                <input type="text" placeholder="社长" name="SZ" class="span5" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                主编</label>
            <div class="controls">
                <input type="text" placeholder="主编" name="Editor" class="span5" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                主任</label>
            <div class="controls">
                <input type="text" placeholder="主任" name="ZR" class="span5" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                ISSN</label>
            <div class="controls">
                <input type="text" placeholder="标准国际刊号" name="ISSN" class="span5" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                CN刊号</label>
            <div class="controls">
                <input type="text" placeholder="国内刊号" name="CN_No" class="span5" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                定价</label>
            <div class="controls">
                <input type="text" placeholder="期刊定价" name="Price" class="span5" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                网址</label>
            <div class="controls">
                <input type="text" placeholder="http://" name="Site" class="span5" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                联系电话</label>
            <div class="controls">
                <input type="text" placeholder="联系电话" name="Phone" class="span5" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                邮箱</label>
            <div class="controls">
                <input type="text" placeholder="联系邮箱" name="Email" 
                    class="{email:true} span5" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                地址</label>
            <div class="controls">
                <input type="text" placeholder="联系地址" name="Address" class="span5" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                邮编</label>
            <div class="controls">
                <input type="text" placeholder="邮政编码" name="PostCode" class="span5" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label">
                邮发代号</label>
            <div class="controls">
                <input type="text" placeholder="邮发代号" name="PostNo" class="span5" />
            </div>
        </div>
        <hr />
        <div class="control-group">
            <div class="controls">
                <input id="btnsubmit" type="submit" value="提交期刊" class="btn btn-large btn-info" />
            </div>
        </div>
    </fieldset>
    </form>
</div>
@section tail{
    <script type="text/javascript" src="/Scripts/plug.js"></script>
    <script type="text/javascript" src="/scripts/jquery.validate.js"></script>
    <script type="text/javascript" src="/scripts/jquery.metadata.js"></script>
    <script type="text/javascript">
        new plug.Control().BuildRelationSelect('sltBaseType', 'sltindType', 'indtype');
        $('#form1').validate({
            errorClass: "help-inline",
            errorElement: "span",
            highlight: function (element, errorClass, validClass) {
                $(element).parents('.control-group').addClass('error');
            },
            unhighlight: function (element, errorClass, validClass) {
                $(element).parents('.control-group').removeClass('error');
            },
            submitHandler: function (form) {
                if ($('input[name="AptitudeOption"]:checked').length == 0) {
                    alert('请选择期刊类型');
                    $('input[name="AptitudeOption"]').eq(0).focus();
                    return false;
                }
                var Aptitude = '';
                $('input[name="AptitudeOption"]:checked').each(function () {
                    Aptitude += $(this).val() + ';'
                });
                $('input[name="Aptitude"]').val(Aptitude);
                $('#btnsubmit').attr('disabled', 'disabled').val('附件上传中...');
            }
        });
        $(function () {
            $('#liknew').siblings('li').each(function () {
                $(this).removeClass('active');
            });
            $('#liknew').addClass('active');
        });
    </script>
}